'use strict';

/**
 * @ngdoc function
 * @name jgappApp.controller:UserUpdatelogCtrl
 * @description
 * # UserUpdatelogCtrl
 * Controller of the jgappApp
 */
angular.module('jgappApp')
    .controller('UserUpdatelogCtrl', function(Util, appVersion, DataService, openApi) {
        var platform = Util.getPlatform();
        this.curentTab = -1
        this.init = function() {
            this.getUpdateLog()
            this.versionNo()
        }
        this.getUpdateLog = function() {
            var param = {};
            param.clientType = platform;
            DataService.getData(openApi.updatelog, param).then(function(data) {
                this.logList = data;
            }.bind(this))
        }
        this.versionNo = function() {
            var param = {};
            appVersion.getAppVersion().then(function(data) {
                this.versionNo = data
            }.bind(this))

        }
        this.isActiveTab = function(index) {
            this.curentTab == index
        }
        this.showsection = function(index) {
            this.curentTab = index
        }
        this.init();
    });
